#！/usr/bin/python 
# -*- coding:utf-8 -*-  
# @Time: 2019/6/7 21:31   
# @Author: Envy   
# @File: djangorestframeworkTest.py

import requests
url = 'http://127.0.0.1:80/10'
data = {
    'name': 'MyPhone',
    'weight': '123g',
    'size': '123*123*3',
    'type': 1,
}
r = requests.post(url, data=data)
print(r.text)